from django.conf.urls import url
from . import views


urlpatterns = [
    # 注册
    url(r"^register/$", views.RegisterView.as_view(),name="register"),
    #用户名重复
    url(r'usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/',views.UsernameCountView.as_view()),
    # 手机号重复
    url(r"^mobiles/(?P<mobile>1[3-9]\d{9})/count/$", views.MobileCountView.as_view()),
    #登录
    url(r"login/$", views.LoginView.as_view(),name='login'),
    #退出
    url(r"logout/$", views.LogoutView.as_view(),name='logout'),
    #展示用户首页
    url(r"info/$", views.UserInfoView.as_view(),name='info'),
    #添加邮箱
    url(r'emails/$',views.EmailView.as_view(),name='email'),
    #邮箱验证
    url(r'emails/verification/$',views.VerifyEmailView.as_view(),name='vefifyemail'),
    #收货地址界面
    url(r'address/$',views.AddressView.as_view(),name='address'),
    #查询省市区地址
    url(r'areas/$',views.AreasView.as_view(),name='areas'),
]